import React, { PureComponent, createContext, forwardRef } from 'react'

export default class Test extends PureComponent {
  constructor(props) {
    super(props)
    this.state = {
      color: '#456178',
      pStyle: {
        color: 'red',
        textDecoration: 'underline',
      },
    }
  }
  render() {
    return (
      <>
        {/* 内联样式 */}
        <div style={{ backgroundColor: this.state.color || 'pink' }}>Test</div>
        <p style={this.state.pStyle}>我是一段文字</p>
      </>
    )
  }
}
